﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002FF RID: 767
	public class TJoin : TNodeWithAliasClause
	{
		// Token: 0x17000627 RID: 1575
		// (get) Token: 0x06001B23 RID: 6947 RVA: 0x0032EED8 File Offset: 0x0032D0D8
		// (set) Token: 0x06001B22 RID: 6946 RVA: 0x0032EEC4 File Offset: 0x0032D0C4
		public virtual int NestedParen
		{
			get
			{
				return this.nestedParen;
			}
			set
			{
				if (value > 0)
				{
					this.withParen = true;
				}
				this.nestedParen = value;
			}
		}

		// Token: 0x17000628 RID: 1576
		// (get) Token: 0x06001B25 RID: 6949 RVA: 0x0032EEE9 File Offset: 0x0032D0E9
		// (set) Token: 0x06001B24 RID: 6948 RVA: 0x0032EEE0 File Offset: 0x0032D0E0
		public virtual bool WithParen
		{
			get
			{
				return this.withParen;
			}
			set
			{
				this.withParen = value;
			}
		}

		// Token: 0x17000629 RID: 1577
		// (get) Token: 0x06001B27 RID: 6951 RVA: 0x0032EEFA File Offset: 0x0032D0FA
		// (set) Token: 0x06001B26 RID: 6950 RVA: 0x0032EEF1 File Offset: 0x0032D0F1
		public virtual TJoinItemList JoinItems
		{
			get
			{
				if (this.joinItems == null)
				{
					this.joinItems = new TJoinItemList();
				}
				return this.joinItems;
			}
			set
			{
				this.joinItems = value;
			}
		}

		// Token: 0x1700062A RID: 1578
		// (get) Token: 0x06001B29 RID: 6953 RVA: 0x0032EF1E File Offset: 0x0032D11E
		// (set) Token: 0x06001B28 RID: 6952 RVA: 0x0032EF15 File Offset: 0x0032D115
		public virtual TJoin Join
		{
			get
			{
				return this.join;
			}
			set
			{
				this.join = value;
			}
		}

		// Token: 0x1700062B RID: 1579
		// (get) Token: 0x06001B2B RID: 6955 RVA: 0x0032EF2F File Offset: 0x0032D12F
		// (set) Token: 0x06001B2A RID: 6954 RVA: 0x0032EF26 File Offset: 0x0032D126
		public virtual TTable Table
		{
			get
			{
				return this.table;
			}
			set
			{
				this.table = value;
			}
		}

		// Token: 0x1700062C RID: 1580
		// (get) Token: 0x06001B2D RID: 6957 RVA: 0x0032EF40 File Offset: 0x0032D140
		// (set) Token: 0x06001B2C RID: 6956 RVA: 0x0032EF37 File Offset: 0x0032D137
		public virtual int Kind
		{
			get
			{
				return this.kind;
			}
			set
			{
				this.kind = value;
			}
		}

		// Token: 0x06001B2E RID: 6958 RVA: 0x0032EF48 File Offset: 0x0032D148
		public TJoin()
		{
			this.kind = 1;
		}

		// Token: 0x1700062D RID: 1581
		// (get) Token: 0x06001B2F RID: 6959 RVA: 0x0032EF57 File Offset: 0x0032D157
		public override TAliasClause AliasClause
		{
			get
			{
				return base.AliasClause;
			}
		}

		// Token: 0x06001B30 RID: 6960 RVA: 0x0032EF5F File Offset: 0x0032D15F
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06001B31 RID: 6961 RVA: 0x0032EF70 File Offset: 0x0032D170
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			int num = this.Kind;
			if (num != 1)
			{
				if (num - 2 <= 1)
				{
					if (this.Kind == 2)
					{
						this.Table.acceptChildren(v);
					}
					else if (this.Kind == 3)
					{
						this.Join.acceptChildren(v);
					}
					this.JoinItems.acceptChildren(v);
				}
			}
			else
			{
				this.Table.acceptChildren(v);
			}
			if (this.AliasClause != null)
			{
				this.AliasClause.acceptChildren(v);
			}
			v.postVisit(this);
		}

		// Token: 0x040019DF RID: 6623
		private int kind;

		// Token: 0x040019E0 RID: 6624
		private TJoin join;

		// Token: 0x040019E1 RID: 6625
		private TTable table;

		// Token: 0x040019E2 RID: 6626
		private TJoinItemList joinItems;

		// Token: 0x040019E3 RID: 6627
		private bool withParen;

		// Token: 0x040019E4 RID: 6628
		private int nestedParen;
	}
}
